#ifndef USART_INC
#define USART_INC

#define USART_BAUD_4800 4800ul
#define USART_UBBR_4800_VALUE ((F_CPU/(USART_BAUD_4800<<4))-1)

#define USART_BAUD_9600 9600ul
#define USART_UBBR_9600_VALUE ((F_CPU/(USART_BAUD_9600<<4))-1)

#define USART_BAUD_19200 19200ul
#define USART_UBBR_19200_VALUE ((F_CPU/(USART_BAUD_19200<<4))-1)

#define USART_BAUD_38400 38400ul
#define USART_UBBR_38400_VALUE ((F_CPU/(USART_BAUD_38400<<4))-1)

// Prototypes
void init_uart(uint16_t baudrate);
void txstr(char *str);
void tx(char data);
unsigned char rx(void);
unsigned char rx_nb(void);

#endif
